<div class="panel panel-default panel-intro">
    
    <div class="panel-heading">
        {:build_heading(null,FALSE)}
        <ul class="nav nav-tabs" data-field="status">
            <li class="{:$Think.get.status === null ? 'active' : ''}"><a href="#t-all" data-value="" data-toggle="tab">{:__('All')}</a></li>

        </ul>
    </div>


    <div class="panel-body">
        <div id="myTabContent" class="tab-content">
            <div class="tab-pane fade active in" id="one">
                <div class="widget-body no-padding">
                    <div id="toolbar" class="toolbar">
                        <a href="javascript:;" class="btn btn-primary btn-refresh" title="{:__('Refresh')}" ><i class="fa fa-refresh"></i> </a>

                        {if condition=" $return_purchase_id && $p_status > 1" /}
                            <!--完成或者作废-->
                        {else /}
                                <a href="javascript:;" class="btn btn-success btn-add {:$auth->check('purchasedetail/add')?'':'hide'}" data-params="return_purchase_id={$return_purchase_id}" title="{:__('Add')}" ><i class="fa fa-plus"></i> {:__('Add')}</a> <!-- data-params="return_purchase_id={$return_purchase_id}"表示添加的参数-->
                            {if condition="!$return_purchase_id" /}
                                <a href=" {:url('returnpurchase/index?status_type=1')}" class="btn btn-success" title="提审">提审</a>
                            {else if condition="$p_status == 1" /}
                                <a href=" {:url('returnpurchase/index?status_type=2&p_id='.$return_purchase_id)}" class="btn btn-success" title="保存入库">保存入库</a>
                                <a href=" {:url('returnpurchase/index?status_type=3&p_id='.$return_purchase_id)}" class="btn btn-warning" title="作废">作废</a>
                            {/if}

                        {/if}



                        <a href=" {:url('returnpurchase/index')}" class="btn btn-success" title="返回">返回</a>

                        <!--
                        <div class="dropdown btn-group {:$auth->check('purchase/multi')?'':'hide'}">
                            <a class="btn btn-primary btn-more dropdown-toggle btn-disabled disabled" data-toggle="dropdown"><i class="fa fa-cog"></i> {:__('More')}</a>
                            <ul class="dropdown-menu text-left" role="menu">
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=normal"><i class="fa fa-eye"></i> {:__('Set to normal')}</a></li>
                                <li><a class="btn btn-link btn-multi btn-disabled disabled" href="javascript:;" data-params="status=hidden"><i class="fa fa-eye-slash"></i> {:__('Set to hidden')}</a></li>
                            </ul>
                        </div>
                        -->

                        
                    </div>
                    <table id="table" class="table table-striped table-bordered table-hover table-nowrap"
                           data-operate-edit="{:$auth->check('purchase/edit')}"
                           data-operate-del="{:$auth->check('purchase/del')}"
                           width="100%">
                    </table>
                </div>
            </div>

        </div>
    </div>
</div>
